package com.maye.dubbocunsumer.contorller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.maye.dubboprovider.service.DubboProviderService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DubboConsumerContorller {
    @Reference(interfaceClass = DubboProviderService.class)
    private DubboProviderService dubboProviderService;

    @RequestMapping("/getName")
    public String getName() {
        return dubboProviderService.getName();
    }
}
